import { createSSRApp } from "vue";
import * as Pinia from 'pinia';
import tmui from "./tmui"
import App from "./App.vue";
import { log } from "console";
import { createPinia } from 'pinia'
import uviewPlus from 'uview-plus'

uni.$showMsg = function(title = '数据请求失败', duration= 1500) {
	uni.showToast({
		title: title,
		icon:'none',
		duration: duration
	})
}
export function createApp() {
  const app = createSSRApp(App);
  app.use(Pinia.createPinia());
  app.use(tmui, { shareDisable: false } as Tmui.tmuiConfig);
  app.use(uviewPlus)
  return {
    app,
    Pinia
  };
}
